package com.ldy.core.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ldy.core.entity.BaseLogs;

public interface BaseLogsMapper extends BaseMapper<BaseLogs>{

	@Select("<script>"
			+ "select * from base_logs t where 1=1 "
			  + "<if test='operator !=null and operator != \"\"'>and t.operator like CONCAT('%',#{operator},'%') </if>"
			  + "<if test='type !=null and type != \"\"'>and t.type = #{type} </if>"
			   + " order by t.operation_time desc"
              + "</script>")
	List<BaseLogs> selectPageList(Page<BaseLogs> page,@Param("operator") String operator, @Param("type") String type);

}
